import { createRouter, createWebHistory } from "vue-router";

const routes = [

  {
    path: "/",
    name: "Login",
    component: () => import("../views/LoginPage.vue"),
  },

  {
    path: "/homepage",
    name: "HomePage",
    component: () => import("../views/HomePage.vue"),
    children: [
      {
        path: "/system",
        name: "system",
        component: () => import("../views/SystemPage.vue"),
        children: [
          {
            path: "gooddata",
            name: "gooddata",
            component: () => import("../components/GoodData.vue"), 
          },


          {
            path: "userlist",
            name: "userlist",
            component: () => import("../views/UserList.vue"),

          },

          {
            path: "goodlist",
            name: "goodlist",
            component: () => import("../views/GoodList.vue"),
          },



          {
            path: "goodtypelist",
            name: "goodtypelist",
            component: () => import("../views/GoodTypeList.vue"),
          },



          {
            path: "couponlist",
            name: "couponlist",
            component: () => import("../views/CouponList.vue"),

          },
          {

            path: "orderlist",
            name: "orderlist",
            component: () => import("../views/OrderList.vue"),
            children: [
              {
                path: "orderdetail",
                name: "orderdetail",
                component: () => import("../views/OrderDetail.vue"),
              },
            ],
          },
          {

            path: "commentlist",
            name: "commentlist",
            component: () => import("../views/CommentList.vue"),


          },
        ],
      },
      {
        path: "/headespage",
        name: "headespage",
        component: () => import("../views/HeadesPage.vue"),
      },
      {
        path: "logopage",
        name: "logopage",
        component: () => import("../views/LogoPage.vue"),
      },

    ],
  },

  // ...其他路由
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
